# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=evillimiter
pkgver=36.46d2033
pkgrel=9
pkgdesc='Tool that limits bandwidth of devices on the same network without access.'
groups=('blackarch' 'blackarch-networking' 'blackarch-misc')
arch=('any')
url='https://github.com/bitbrute/evillimiter'
license=('MIT')
depends=('python' 'python-netaddr' 'python-netifaces' 'python-colorama'
         'python-terminaltables' 'python-tqdm' 'scapy')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/bitbrute/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" -O1 --prefix=/usr --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

